<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>8.2函数的隐形参数arguments</title>
    <script type="text/javascript">
        function fun(a, b) {
            alert("a = " + a);
            alert("b = " + b);
            alert("arguments.length = " + arguments.length);//可看参数个数
            for (var i = 0; i < arguments.length; i++) {
                alert(arguments[i]);
            }
        }

        var arr = [];
        arr[0] = 11;
        arr[1] = 22;
        fun(1, 2, "3", true, arr);
    </script>
</head>
<body>
</body>
</html>